package com.umakr.ax.common.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.umakr.ax.common.model.PluginCouponResult;
import com.umakr.ax.common.vo.CouponStatusInfoVO;
import com.umakr.ax.common.vo.PluginCouponListVO;
import com.umakr.ax.common.vo.PluginCouponResultListVO;
import com.umakr.ax.core.base.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author Umakr-Code-Generator
 * @since 2017-12-30
 */
public interface PluginCouponResultMapper extends BaseMapper<PluginCouponResult> {
    Page<PluginCouponResultListVO> listCouponsByCouponId(@Param("couponId") Long couponId, @Param("status") Integer status);

    List<Integer> countCouponsResultByCouponId(@Param("couponId") Long couponId);

    Page<PluginCouponListVO> listCouponsByUserIdAndStatus(@Param("userId")Long userId, @Param("status")Integer status);

    Page<PluginCouponResultListVO> listPluginCouponResult(@Param("couponId")Long couponId,@Param("useStatus")Integer useStatus);

    Map<String,Object> findCouponsInfoByCouponNum(@Param("couponNum")String couponNum);

    List<CouponStatusInfoVO> getCouponStatusInfo(@Param("couponId") Long couponId, @Param("userId")Long userId);
}